/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cis36b.project1;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/**
 *I need help understanding the layout of the main call
 * 
 * @author Jonah
 */
public class Cis36bProject1 {
    
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public JFrame frame = new JFrame();
            public Board game = new Board();
            public UI ui = new UI();
            
            public void run() {
                javax.swing.GroupLayout layout = new javax.swing.GroupLayout(frame);
                //frame. statements might need to be encapusalted in a new class
                frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
                
                frame.setLayout(new BorderLayout());//I don't understand how layout managers work
                frame.getContentPane().add(game ,   BorderLayout.WEST);
                frame.getContentPane().add(ui, BorderLayout.EAST);
                //ui.addToPanel(game);
                //frame.getContentPane().setLayout(layout);
                frame.setVisible(true);
                frame.pack();
                //game.resetBoard();
                //game.paintTest(game.getGraphics());
                System.out.println(game.getGraphics());
                //game.paintTest(this);
            }
        });
    }
}
